﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MyChart
{
    /// <summary>
    /// 图表控件反射工厂
    /// </summary>
    public static class ChartFactory
    {
        #region 方法

        /// <summary>
        /// 创建图表控件
        /// </summary>
        /// <param name="chartType">控件类型名称（类名，区分大小写）</param>
        /// <returns>控件实例</returns>
        public static FusionChart CreateChart(string chartType)
        {
            return (FusionChart)Activator.CreateInstance(Type.GetType("MyChart." + chartType.Trim()));
        }

        #endregion
    }
}
